//
//  PhotoTool.h
//  XiangMuB
//
//  Created by lanou3g on 16/8/17.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <Photos/Photos.h>
#import "PhotoAblumListModel.h"

@interface PhotoTool : NSObject

+ (instancetype)sharePhotoTool;


- (NSArray<PHAsset *> *)getAllAssetInPhotoAblumWithAscending:(BOOL)ascending;

- (NSArray<PhotoAblumListModel *> *)getPhotoAblumList;

//获取指定相册内图片
- (NSArray<PHAsset *> *)getAssetsInAssetCollection:(PHAssetCollection *)assetaCollection ascending:(BOOL)ascending;

- (void)requestImageForAsset:(PHAsset *)asset size:(CGSize)size resizeMode:(PHImageRequestOptionsResizeMode)resizeMode completion:(void (^)(UIImage *image, NSDictionary *info))completion;


- (void)requestImageForAsset:(PHAsset *)asset scale:(CGFloat)scale resizeMode:(PHImageRequestOptionsResizeMode)resizeMode completion:(void (^)(UIImage *image))completion;

- (void)saveImageToAblum:(UIImage *)image completion:(void (^)(BOOL suc, PHAsset *asset))completion;

//判断图片是否存储在本地/或者已经从iCloud上下载到本地
- (BOOL)judgeAssetisInLocalAblum:(PHAsset *)asset;

//获取图片字节大小
- (void)getPhotoBytesWithArray:(NSArray *)photos completion:(void (^)(NSString *photosBytes))completion;

@end
